package com.phkj.qdh.ui.adapter.usercenter

import android.content.Context
import android.view.ViewGroup
import com.chad.library.adapter4.BaseQuickAdapter
import com.chad.library.adapter4.viewholder.QuickViewHolder
import com.phkj.qdh.R
import com.phkj.qdh.bean.ThreeScoreRecordBean

class MyThreeScoreAdapter : BaseQuickAdapter<ThreeScoreRecordBean, QuickViewHolder>() {
    override fun onBindViewHolder(
        holder: QuickViewHolder, position: Int, item: ThreeScoreRecordBean?
    ) {
        holder.setText(R.id.tv, item!!.inspect + "-" + item.inspectTypeName)
        if (item.score == 0) {
            holder.setText(R.id.tv1, item.score)
        } else {
            holder.setText(R.id.tv1, "-" + item.score)

        }
        holder.setText(R.id.tv3, item.createTime)
        holder.setText(R.id.tv4, item.disposal)
    }

    override fun onCreateViewHolder(
        context: Context, parent: ViewGroup, viewType: Int
    ): QuickViewHolder {
        return QuickViewHolder(R.layout.item_three_score_record, parent)
    }
}